package com.guigu.pd.serviceapi.authfeign;

import com.guigu.pd.serviceapi.pojo.AuthUserEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * @author lizongyi
 * @date 2022/7/22
 * @Note
 */
@FeignClient(value = "pd-auth", path = "/auth/authuser")
public interface UserFeign {

    @GetMapping("/getnamebyid/{id}")
    String getnamebyid(@PathVariable("id") String id);

    @GetMapping("/getuser/{id}")
    public String getUser(@PathVariable("id")String id);

    /**
     * 根据网点id获取网点下的所有快递员
     * @param id
     * @return
     */
    @GetMapping("/getuserkdy/{id}")
    public String getuserkdy(@PathVariable("id")String id);




    @GetMapping("/getcourierr")
    public Map<String, String> getallCourier();


    @PostMapping("/sevauserqqq")
    public String sevauserqqq(@RequestBody AuthUserEntity authUserEntity);


    @GetMapping("/getuserbyid/{id}")
    public String getuserbyId(@PathVariable("id")String id);

    @GetMapping("/getuserinfobyid/{id}")
    public String getuserinfobyId(@PathVariable("id")String id);

    @GetMapping("/getidbyname/{name}")
    public String getidbyName(@PathVariable("name") String name);
}
